<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Miscellaneous Utilities</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="index.html" title="Pango Reference Manual">
<link rel="up" href="lowlevel.html" title="Low Level Functionality">
<link rel="prev" href="pango-Modules.html" title="Modules">
<link rel="next" href="pango-Version-Checking.html" title="Version Checking">
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
<link rel="chapter" href="rendering.html" title="Rendering with Pango">
<link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
<link rel="chapter" href="tools.html" title="Pango Tools">
<link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="index-all.html" title="Index">
<link rel="index" href="index-deprecated.html" title="Index of deprecated symbols">
<link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
<link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
<link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
<link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
<link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10">
<link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12">
<link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14">
<link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16">
<link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18">
<link rel="index" href="index-1.20.html" title="Index of new symbols in 1.20">
<link rel="index" href="index-1.22.html" title="Index of new symbols in 1.22">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="pango-Modules.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Pango Reference Manual</th>
<td><a accesskey="n" href="pango-Version-Checking.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#pango-Miscellaneous-Utilities.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#pango-Miscellaneous-Utilities.description" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="pango-Miscellaneous-Utilities"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="pango-Miscellaneous-Utilities.top_of_page"></a>Miscellaneous Utilities</span></h2>
<p>Miscellaneous Utilities — Various convenience and utility functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="pango-Miscellaneous-Utilities.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
char**              <a class="link" href="pango-Miscellaneous-Utilities.html#pango-split-file-list" title="pango_split_file_list ()">pango_split_file_list</a>               (const char *str);
char*               <a class="link" href="pango-Miscellaneous-Utilities.html#pango-trim-string" title="pango_trim_string ()">pango_trim_string</a>                   (const char *str);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                <a class="link" href="pango-Miscellaneous-Utilities.html#pango-read-line" title="pango_read_line ()">pango_read_line</a>                     (FILE *stream,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
>GString</a> *str);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-skip-space" title="pango_skip_space ()">pango_skip_space</a>                    (const char **pos);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-word" title="pango_scan_word ()">pango_scan_word</a>                     (const char **pos,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
>GString</a> *out);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-string" title="pango_scan_string ()">pango_scan_string</a>                   (const char **pos,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
>GString</a> *out);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-int" title="pango_scan_int ()">pango_scan_int</a>                      (const char **pos,
                                                         int *out);
char*               <a class="link" href="pango-Miscellaneous-Utilities.html#pango-config-key-get" title="pango_config_key_get ()">pango_config_key_get</a>                (const char *key);
void                <a class="link" href="pango-Miscellaneous-Utilities.html#pango-lookup-aliases" title="pango_lookup_aliases ()">pango_lookup_aliases</a>                (const char *fontname,
                                                         char ***families,
                                                         int *n_families);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-enum" title="pango_parse_enum ()">pango_parse_enum</a>                    (<a
href="/home/behdad/.local/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
                                                         const char *str,
                                                         int *value,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn,
                                                         char **possible_values);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-style" title="pango_parse_style ()">pango_parse_style</a>                   (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle">PangoStyle</a> *style,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-variant" title="pango_parse_variant ()">pango_parse_variant</a>                 (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant">PangoVariant</a> *variant,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-weight" title="pango_parse_weight ()">pango_parse_weight</a>                  (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight">PangoWeight</a> *weight,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-stretch" title="pango_parse_stretch ()">pango_parse_stretch</a>                 (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch">PangoStretch</a> *stretch,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);
const char*         <a class="link" href="pango-Miscellaneous-Utilities.html#pango-get-sysconf-subdirectory" title="pango_get_sysconf_subdirectory ()">pango_get_sysconf_subdirectory</a>      (void);
const char*         <a class="link" href="pango-Miscellaneous-Utilities.html#pango-get-lib-subdirectory" title="pango_get_lib_subdirectory ()">pango_get_lib_subdirectory</a>          (void);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
>guint8</a>*             <a class="link" href="pango-Miscellaneous-Utilities.html#pango-log2vis-get-embedding-levels" title="pango_log2vis_get_embedding_levels ()">pango_log2vis_get_embedding_levels</a>  (const <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
                                                         int length,
                                                         <a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection">PangoDirection</a> *pbase_dir);
<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-is-zero-width" title="pango_is_zero_width ()">pango_is_zero_width</a>                 (<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> ch);
void                <a class="link" href="pango-Miscellaneous-Utilities.html#pango-quantize-line-geometry" title="pango_quantize_line_geometry ()">pango_quantize_line_geometry</a>        (int *thickness,
                                                         int *position);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="pango-Miscellaneous-Utilities.description"></a><h2>Description</h2>
<p>
The functions and utilities in this section are mostly used from Pango
backends and modules, but may be useful for other purposes too.
</p>
</div>
<div class="refsect1" lang="en">
<a name="pango-Miscellaneous-Utilities.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="pango-split-file-list"></a><h3>pango_split_file_list ()</h3>
<pre class="programlisting">char**              pango_split_file_list               (const char *str);</pre>
<p>
Splits a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR:CAPS"
><code class="literal">G_SEARCHPATH_SEPARATOR</code></a>-separated list of files, stripping
white space and substituting ~/ with $HOME/.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR:CAPS"
><code class="literal">G_SEARCHPATH_SEPARATOR</code></a> separated list of filenames
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a list of strings to be freed with <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strfreev"
><code class="function">g_strfreev()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-trim-string"></a><h3>pango_trim_string ()</h3>
<pre class="programlisting">char*               pango_trim_string                   (const char *str);</pre>
<p>
Trims leading and trailing whitespace from a string.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> a string
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A newly-allocated string that must be freed with <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-read-line"></a><h3>pango_read_line ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                pango_read_line                     (FILE *stream,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
>GString</a> *str);</pre>
<p>
Reads an entire line from a file into a buffer. Lines may
be delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiter
is not written into the buffer. Text after a '#' character is treated as
a comment and skipped. '\' can be used to escape a # character.
'\' proceeding a line delimiter combines adjacent lines. A '\' proceeding
any other character is ignored and written into the output buffer
unmodified.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td> a stdio stream
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
><span class="type">GString</span></a> buffer into which to write the result
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> 0 if the stream was already at an <code class="literal">EOF</code> character, otherwise
              the number of lines read (this is useful for maintaining
              a line number counter which doesn't combine lines with '\')
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-skip-space"></a><h3>pango_skip_space ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_skip_space                    (const char **pos);</pre>
<p>
Skips 0 or more characters of white space.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td> in/out string position
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if skipping the white space leaves
the position at a '\0' character.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-scan-word"></a><h3>pango_scan_word ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_scan_word                     (const char **pos,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
>GString</a> *out);</pre>
<p>
Scans a word into a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
><span class="type">GString</span></a> buffer. A word consists
of [A-Za-z_] followed by zero or more [A-Za-z_0-9]
Leading white space is skipped.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td> in/out string position
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td> a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
><span class="type">GString</span></a> into which to write the result
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if a parse error occurred.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-scan-string"></a><h3>pango_scan_string ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_scan_string                   (const char **pos,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
>GString</a> *out);</pre>
<p>
Scans a string into a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
><span class="type">GString</span></a> buffer. The string may either
be a sequence of non-white-space characters, or a quoted
string with '"'. Instead a quoted string, '\"' represents
a literal quote. Leading white space outside of quotes is skipped.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td> in/out string position
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td> a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Strings.html#GString"
><span class="type">GString</span></a> into which to write the result
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if a parse error occurred.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-scan-int"></a><h3>pango_scan_int ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_scan_int                      (const char **pos,
                                                         int *out);</pre>
<p>
Scans an integer.
Leading white space is skipped.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td> in/out string position
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td> an int into which to write the result
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if a parse error occurred.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-config-key-get"></a><h3>pango_config_key_get ()</h3>
<pre class="programlisting">char*               pango_config_key_get                (const char *key);</pre>
<p>
Looks up a key in the Pango config database
(pseudo-win.ini style, read from $sysconfdir/pango/pangorc,
 ~/.pangorc, and getenv (PANGO_RC_FILE).)</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td> Key to look up, in the form "SECTION/KEY".
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the value, if found, otherwise <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. The value is a
newly-allocated string and must be freed with <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-lookup-aliases"></a><h3>pango_lookup_aliases ()</h3>
<pre class="programlisting">void                pango_lookup_aliases                (const char *fontname,
                                                         char ***families,
                                                         int *n_families);</pre>
<p>
Look up all user defined aliases for the alias <em class="parameter"><code>fontname</code></em>.
The resulting font family names will be stored in <em class="parameter"><code>families</code></em>,
and the number of families in <em class="parameter"><code>n_families</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fontname</code></em> :</span></p></td>
<td> an ascii string
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>families</code></em> :</span></p></td>
<td> will be set to an array of font family names.
   this array is owned by pango and should not be freed.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_families</code></em> :</span></p></td>
<td> will be set to the length of the <em class="parameter"><code>families</code></em> array.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-parse-enum"></a><h3>pango_parse_enum ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_parse_enum                    (<a
href="/home/behdad/.local/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
                                                         const char *str,
                                                         int *value,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn,
                                                         char **possible_values);</pre>
<p>
Parses an enum type and stored the result in <em class="parameter"><code>value</code></em>.
</p>
<p>
If <em class="parameter"><code>str</code></em> does not match the nick name of any of the possible values for the
enum, <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> is returned, a warning is issued if <em class="parameter"><code>warn</code></em> is <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, and a
string representing the list of possible values is stored in
<em class="parameter"><code>possible_values</code></em>.  The list is slash-separated, eg.
"none/start/middle/end".  If failed and <em class="parameter"><code>possible_values</code></em> is not <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
returned string should be freed using <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> enum type to parse, eg. <a class="link" href="pango-Layout-Objects.html#PANGO-TYPE-ELLIPSIZE-MODE:CAPS" title="PANGO_TYPE_ELLIPSIZE_MODE"><code class="literal">PANGO_TYPE_ELLIPSIZE_MODE</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> string to parse.  May be <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td> integer to store the result in, or <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
<td> if <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, issue a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Message-Logging.html#g-warning"
><code class="function">g_warning()</code></a> on bad input.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>possible_values</code></em> :</span></p></td>
<td> place to store list of possible values on failure, or <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  1.16
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-parse-style"></a><h3>pango_parse_style ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_parse_style                   (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle">PangoStyle</a> *style,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);</pre>
<p>
Parses a font style. The allowed values are "normal",
"italic" and "oblique", case variations being
ignored.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> a string to parse.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
<td> a <a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle"><span class="type">PangoStyle</span></a> to store the result in.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
<td> if <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, issue a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Message-Logging.html#g-warning"
><code class="function">g_warning()</code></a> on bad input.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-parse-variant"></a><h3>pango_parse_variant ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_parse_variant                 (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant">PangoVariant</a> *variant,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);</pre>
<p>
Parses a font variant. The allowed values are "normal"
and "smallcaps" or "small_caps", case variations being
ignored.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> a string to parse.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>variant</code></em> :</span></p></td>
<td> a <a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant"><span class="type">PangoVariant</span></a> to store the result in.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
<td> if <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, issue a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Message-Logging.html#g-warning"
><code class="function">g_warning()</code></a> on bad input.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-parse-weight"></a><h3>pango_parse_weight ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_parse_weight                  (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight">PangoWeight</a> *weight,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);</pre>
<p>
Parses a font weight. The allowed values are "heavy",
"ultrabold", "bold", "normal", "light", "ultraleight"
and integers. Case variations are ignored.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> a string to parse.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>weight</code></em> :</span></p></td>
<td> a <a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight"><span class="type">PangoWeight</span></a> to store the result in.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
<td> if <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, issue a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Message-Logging.html#g-warning"
><code class="function">g_warning()</code></a> on bad input.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-parse-stretch"></a><h3>pango_parse_stretch ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_parse_stretch                 (const char *str,
                                                         <a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch">PangoStretch</a> *stretch,
                                                         <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> warn);</pre>
<p>
Parses a font stretch. The allowed values are
"ultra_condensed", "extra_condensed", "condensed",
"semi_condensed", "normal", "semi_expanded", "expanded",
"extra_expanded" and "ultra_expanded". Case variations are
ignored and the '_' characters may be omitted.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> a string to parse.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stretch</code></em> :</span></p></td>
<td> a <a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch"><span class="type">PangoStretch</span></a> to store the result in.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
<td> if <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, issue a <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Message-Logging.html#g-warning"
><code class="function">g_warning()</code></a> on bad input.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-get-sysconf-subdirectory"></a><h3>pango_get_sysconf_subdirectory ()</h3>
<pre class="programlisting">const char*         pango_get_sysconf_subdirectory      (void);</pre>
<p>
On Unix, returns the name of the "pango" subdirectory of SYSCONFDIR
(which is set at compile time). On Windows, returns the etc\pango
subdirectory of the Pango installation directory (which is deduced
at run time from the DLL's location).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the Pango sysconf directory. The returned string should
not be freed.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-get-lib-subdirectory"></a><h3>pango_get_lib_subdirectory ()</h3>
<pre class="programlisting">const char*         pango_get_lib_subdirectory          (void);</pre>
<p>
On Unix, returns the name of the "pango" subdirectory of LIBDIR
(which is set at compile time). On Windows, returns the lib\pango
subdirectory of the Pango installation directory (which is deduced
at run time from the DLL's location).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the Pango lib directory. The returned string should
not be freed.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-log2vis-get-embedding-levels"></a><h3>pango_log2vis_get_embedding_levels ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
>guint8</a>*             pango_log2vis_get_embedding_levels  (const <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
                                                         int length,
                                                         <a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection">PangoDirection</a> *pbase_dir);</pre>
<p>
This will return the bidirectional embedding levels of the input paragraph
as defined by the Unicode Bidirectional Algorithm available at:
</p>
<p>
  http://www.unicode.org/reports/tr9/
</p>
<p>
If the input base direction is a weak direction, the direction of the
characters in the text will determine the final resolved direction.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>      the text to itemize.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>    the number of bytes (not characters) to process, or -1
            if <em class="parameter"><code>text</code></em> is nul-terminated and the length should be calculated.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbase_dir</code></em> :</span></p></td>
<td> input base direction, and output resolved direction.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated array of embedding levels, one item per
              character (not byte), that should be freed using g_free.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-is-zero-width"></a><h3>pango_is_zero_width ()</h3>
<pre class="programlisting"><a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            pango_is_zero_width                 (<a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> ch);</pre>
<p>
Checks <em class="parameter"><code>ch</code></em> to see if it is a character that should not be
normally rendered on the screen.  This includes all Unicode characters
with "ZERO WIDTH" in their name, as well as <em class="firstterm">bidi</em> formatting characters, and
a few other ones.  This is totally different from <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#g-unichar-iszerowidth"
><code class="function">g_unichar_iszerowidth()</code></a>
and is at best misnamed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td> a Unicode character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>ch</code></em> is a zero-width character, <a
href="/home/behdad/.local/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> otherwise

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  1.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pango-quantize-line-geometry"></a><h3>pango_quantize_line_geometry ()</h3>
<pre class="programlisting">void                pango_quantize_line_geometry        (int *thickness,
                                                         int *position);</pre>
<p>
Quantizes the thickness and position of a line, typically an
underline or strikethrough, to whole device pixels, that is integer
multiples of <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a>. The purpose of this function is to avoid
such lines looking blurry.
</p>
<p>
Care is taken to make sure <em class="parameter"><code>thickness</code></em> is at least one pixel when this
function returns, but returned <em class="parameter"><code>position</code></em> may become zero as a result
of rounding.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>thickness</code></em> :</span></p></td>
<td> pointer to the thickness of a line, in Pango units
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td> corresponding position
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  1.12
</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.10</div>
</body>
</html>
